<?php
require_once("./DButil.php");

// $videoId=$_REQUEST["videoId"];
$arr=$_SESSION["loginTeacher"];

$courseId=$_REQUEST["courseId"];
$videoInfo=$_REQUEST["videoInfo"];
$videoPath=$_REQUEST["videoPath"];


$sql1="insert into t_video (videoInfo,courseId,videoPath,status,teacherId) values ('{$videoInfo}','{$courseId}','{$videoPath}',0,'{$arr["teacherId"]}')";
$add=update($sql1);
if ($add) {
    $result = [
        "msg" => "添加成功",
        "code" => 200,
        "success" => true
    ];
}else{
    $result = [
        "msg" => "添加失败",
        "code" => 400,
        "success" => false
    ];
}


header("Content-Type:application/json;charset=utf-8");
echo json_encode($result);
?>